<?php
if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

require './source/function/function_database.php';

$tids = array (149, 150);

$tid = $_G["gp_tid"];
if (!isset($tid) || !in_array($tid, $tids)) {
	$tid = $tids[0];
}
$tid = intval($tid);

$ttitle = (($tid == 149) ? '孕妇食谱' : '乳母食谱');

$sql = " select id,title,sub_title,author_name,summary from t_article where topic_id = $tid order by id ";
list($aids, $articles) = query($sql, 'id');

$aid = $_G["gp_aid"];
if (!isset($aid) || !in_array($aid, $aids)) {
	$aid = $aids[0];
}
$aid = intval($aid);

$atitle =  get_title($articles, $aid);

$sql = " select id, article_id, title, content, content_new_line, paragraph_level from t_paragraph  where article_id = $aid ";
$paragraphs = query($sql);

list($show_pre, $show_next, $pre_id, $next_id) = show($aids, $aid);

include_once template("know/food");
?>